from random import*
import time 
def readlist(filename):
    start = time()
    file = open(filename)
    Swapped = True
    a = []
    for i in open(filename):
        a.append(int(i))
    j = len(a)
    while Swapped:
        Swapped = False
        for i in range(len(a)-1):
            if a[i] > a[i + 1]:
                a[i], a[i + 1] = a[i + 1], a[i]
                Swapped = True
finish = time.time()
print(filename, round(finish,start)*1000,'milleseconds')
readlist('m1_sorted.txt')
readlist('m2_reverse.txt')
readlist('m3_shuffle.txt')
